export default [
  {
    path: '/',
    name: 'Index',
    component: (): unknown => import('@/layout/index.vue'),
    children: [
      {
        path: '',
        name: 'Index',
        component: (): unknown => import('@/pages/index.vue')
      },
      {
        path: 'signin',
        name: 'Signin',
        component: (): unknown => import('@/pages/signin/index.vue')
      },
      {
        path: 'template',
        name: 'Template',
        component: (): unknown => import('@/pages/template/index.vue'),
        meta: {
          tip: '该功能暂暂未开放，敬请期待!'
        }
      },
      {
        path: 'account',
        name: 'Account',
        component: (): unknown => import('@/pages/account/index.vue'),
        redirect: '/account/profile',
        children: [
          {
            path: 'profile',
            name: 'AccountProfile',
            component: (): unknown => import('@/pages/account/profile.vue')
          },
          {
            path: 'mind',
            name: 'AccountMind',
            component: (): unknown => import('@/pages/account/mind.vue')
          }
        ]
      }
    ]
  },
  {
    path: '/home',
    name: 'Home',
    component: (): unknown => import('@/pages/home/index.vue'),
    redirect: '/home/work',
    children: [
      {
        path: 'recents',
        name: 'Recents',
        component: (): unknown => import('@/pages/recents/index.vue')
      },
      {
        path: 'sharing',
        name: 'Sharing',
        component: (): unknown => import('@/pages/sharing/index.vue')
      },
      {
        path: 'trash',
        name: 'Trash',
        component: (): unknown => import('@/pages/trash/index.vue')
      },
      {
        path: 'work/:id?',
        name: 'Work',
        component: (): unknown => import('@/pages/work/index.vue')
      }
    ]
  },
  {
    path: '/mind-map/:id',
    name: 'MindMap',
    component: (): unknown => import('@/pages/mind-map/index.vue')
  },
  {
    path: '/oauth',
    name: 'Oauth',
    children: [
      {
        path: 'gitee',
        name: 'Gitee',
        component: (): unknown => import('@/pages/oauth/Gitee.vue')
      },
      {
        path: 'github',
        name: 'Github',
        component: (): unknown => import('@/pages/oauth/Github.vue')
      }
    ]
  },
  {
    path: '/preview-mind-map/:mindId/:mapId?',
    name: 'PreviewMindMap',
    component: (): unknown => import('@/pages/preview-mind-map/index.vue')
  },
  {
    path: '/:catchAll(.*)',
    name: 'Err404',
    component: (): unknown => import('@/pages/Err404.vue')
  }
]
